//
//  EFARptPreTypeTCell.m
//  efairy
//
//  Created by XiangDongMBP on 2017/8/19.
//  Copyright © 2017年 East. All rights reserved.
//

#import "EFARptPreTypeTCell.h"
#import "EFAModel.h"

@implementation EFARptPreTypeTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configViewWithOviAnaItem:(EFARptOviAnaItem *)item {
    if (!item) {
        [self configDefaultValue];
        return;
    }
    
    self.label1.text = item.deviceTypeDes;
    self.label2.text = [NSString stringWithFormat:@"%ld", (long)item.install_number];
    self.label3.text = [NSString stringWithFormat:@"%ld", (long)item.alarm_number];
    self.label4.text = [NSString stringWithFormat:@"%0.2f%%", item.alarm_scale / 100.0];
    self.label5.text = [NSString stringWithFormat:@"%ld", (long)item.alarm_times];
}

- (void)configDefaultValue {
    self.label1.text = @"类型";
    self.label2.text = @"点位数量";
    self.label3.text = @"报警点位";
    self.label4.text = @"报警比例";
    self.label5.text = @"报警次数";
}

@end
